Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-48260: Update dns1123Subdomain validation message for machineNamePrefix #2147

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chiragkyal
Copy link
Member

@chiragkyal chiragkyal commented Jan 15, 2025

Update dns1123Subdomain CEL validation message for machineNamePrefix field.

message="a lowercase RFC 1123 subdomain must consist of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted."

https://issues.redhat.com/browse/OCPBUGS-48260

/assign @JoelSpeed

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 15, 2025
@openshift-ci-robot
Copy link

@chiragkyal: This pull request references Jira Issue OCPBUGS-48260, which is invalid:

  • expected the bug to target the "4.19.0" version, but no target version was set
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Update dns1123Subdomain CEL validation message for machineNamePrefix field.

message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. Consecutive '.' are not permitted."

https://issues.redhat.com/browse/OCPBUGS-48260

/assign @JoelSpeed

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

openshift-ci bot commented Jan 15, 2025

Hello @chiragkyal! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@chiragkyal
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link

@chiragkyal: This pull request references Jira Issue OCPBUGS-48260, which is invalid:

  • expected the bug to target the "4.19.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 15, 2025
@chiragkyal
Copy link
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 15, 2025
@openshift-ci-robot
Copy link

@chiragkyal: This pull request references Jira Issue OCPBUGS-48260, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @huali9

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from huali9 January 15, 2025 07:35
@huali9
Copy link

huali9 commented Jan 15, 2025

@chiragkyal .- or -. is not allowed either in my testing, it seems that . can only be adjacent to alphanumeric character

@chiragkyal
Copy link
Member Author

@chiragkyal .- or -. is not allowed either in my testing, it seems that . can only be adjacent to alphanumeric character

Right, because each block must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of each block.

@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 15, 2025
@huali9
Copy link

huali9 commented Jan 15, 2025

@chiragkyal .- or -. is not allowed either in my testing, it seems that . can only be adjacent to alphanumeric character

Right, because each block must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of each block.

Do you think this needs to be reflected in the documentation as well?

@chiragkyal
Copy link
Member Author

@chiragkyal .- or -. is not allowed either in my testing, it seems that . can only be adjacent to alphanumeric character

Right, because each block must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of each block.

Do you think this needs to be reflected in the documentation as well?

@JoelSpeed How about making the message more informative to avoid confusion?

a lowercase RFC 1123 subdomain must consist of lowercase alphanumeric characters, hyphens ('-'), and dots ('.'). Each block, separated by dots, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive dots are not permitted.

@JoelSpeed
Copy link
Contributor

Looks good, but we use the term period, not dot for the . character within API docs

@chiragkyal chiragkyal force-pushed the update-machineNamePrefix branch from fa0436c to 2e22800 Compare January 15, 2025 10:47
@@ -52,7 +52,7 @@ type ControlPlaneMachineSetSpec struct {
// For example, if machineNamePrefix is set to 'control-plane',
// and three machines are created, their names might be:
// control-plane-abcde-0, control-plane-fghij-1, control-plane-klmno-2
// +openshift:validation:FeatureGateAwareXValidation:featureGate=CPMSMachineNamePrefix,rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
// +openshift:validation:FeatureGateAwareXValidation:featureGate=CPMSMachineNamePrefix,rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to also update lines 48 to 50 to be similar?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, updated the API field description to be similar.

@chiragkyal chiragkyal force-pushed the update-machineNamePrefix branch from 2e22800 to 601c52c Compare January 15, 2025 11:40
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 15, 2025
@JoelSpeed
Copy link
Contributor

/lgtm
/label acknowledge-critical-fixes-only

Docs only change

@openshift-ci openshift-ci bot added acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. lgtm Indicates that a PR is ready to be merged. labels Jan 15, 2025
Copy link
Contributor

openshift-ci bot commented Jan 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chiragkyal, JoelSpeed

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 15, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c1a063b and 2 for PR HEAD 601c52c in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 52377f0 and 1 for PR HEAD 601c52c in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 52377f0 and 2 for PR HEAD 601c52c in total

1 similar comment
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 52377f0 and 2 for PR HEAD 601c52c in total

@chiragkyal
Copy link
Member Author

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 52377f0 and 2 for PR HEAD 601c52c in total

2 similar comments
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 52377f0 and 2 for PR HEAD 601c52c in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 52377f0 and 2 for PR HEAD 601c52c in total

@chiragkyal
Copy link
Member Author

/retest-required

1 similar comment
@chiragkyal
Copy link
Member Author

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 366ffb8 and 1 for PR HEAD 601c52c in total

@chiragkyal
Copy link
Member Author

@JoelSpeed Any idea what's wrong with the aws jobs? They have a hard time passing.

@JoelSpeed
Copy link
Contributor

I think they are permabroke right now, I posted last week and folks have been looking into it
https://redhat-internal.slack.com/archives/C01CQA76KMX/p1737106812413019

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ef08cf6 and 0 for PR HEAD 601c52c in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ef08cf6 and 2 for PR HEAD 601c52c in total

1 similar comment
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ef08cf6 and 2 for PR HEAD 601c52c in total

Copy link
Contributor

openshift-ci bot commented Jan 22, 2025

@chiragkyal: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azure 601c52c link false /test e2e-azure
ci/prow/okd-scos-e2e-aws-ovn 601c52c link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-aws-serial 601c52c link true /test e2e-aws-serial
ci/prow/e2e-aws-serial-techpreview 601c52c link true /test e2e-aws-serial-techpreview

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e6cc8f6 and 1 for PR HEAD 601c52c in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e6cc8f6 and 2 for PR HEAD 601c52c in total

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants